package com.neusoft.yuejian_6.model;

import com.neusoft.yuejian_6.javabean.Show;
import com.neusoft.yuejian_6.javabean.Train;
import com.neusoft.yuejian_6.service.ShowService;
import com.neusoft.yuejian_6.service.TrainService;

import java.util.List;

import retrofit2.Call;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Created by Mao on 2017/10/8.
 */

public class ShowModel {
    private Retrofit retrofit;

    public ShowModel() {
        retrofit = new Retrofit.Builder()
                .baseUrl("http://10.0.2.2/neu1_yuejian/index.php/Api/")
                .addConverterFactory(GsonConverterFactory.create())
                .build();
}
    //晒图列表
    public Call<List<Show>> getShowlist(){
        ShowService showService = retrofit.create(ShowService.class);
        return showService.getShowlist();
    }
    //晒图详情
    public Call<Show> getShowById(int s_id){
        ShowService showService=retrofit.create(ShowService.class);
        return showService.getShowById(s_id);
    }

}

